var lcProcessWinAdd;
var lcProcessFormAdd;
function addLcProcess(){
	initLcProcessFormAdd();
	lcProcessWinAdd = Ext.create('Ext.Window',{
		layout:'fit',
		width:800,
		height:400,
		maximizable:true,
		minimizable:true,
		animateTarget:document.body,
		plain:true,
		modal:true,
		title:'添加信息',
		listeners:{
			minimize:function(win,opts){
				if(!win.collapse()){
					win.collapse();
				}else{
					win.expand();
				}
			}
		},
		items:lcProcessFormAdd,
		buttons:[{
			text:'保存',
			itemId:'save',
			handler:function(button){
				submitForm(lcProcessFormAdd,'../lcProcessController/addLcProcess',grid,lcProcessWinAdd,false,true);
			}
		},{
			text:'关闭',
			itemId:'close',
			handler:function(button){
				button.up('window').close();
			}
		}]
	});
	lcProcessWinAdd.show();
	/**初始化附件右键菜单开始 参数4为1表示拥有上传和删除功能 即新增和编辑页面使用**/
	initFileRight('xt_attachment','xt_attachment_pic',1,1,'zip,rar','1000000','ActivitiLc','ActivitiLcRelative');
	/**初始化附件右键菜单结束**/

}
function initLcProcessFormAdd(){
	lcProcessFormAdd = Ext.create('Ext.FormPanel',{
		xtype:'form',
		waitMsgTarget:true,
		defaultType:'textfield',
		autoScroll:true,
		/**新方法使用开始**/  
        scrollable:true,  
        scrollable:'x',
        scrollable:'y',
        /**新方法使用结束**/ 
		fieldDefaults:{
			labelWidth:70,
			labelAlign:'left',
			flex:1,
			margin:'2 5 4 5'
		},
		items:[
		{
			fieldLabel:'流程标题',
			xtype:'textfield',
			name:'lc_process_title',
			allowBlank:false,
			maxLength:255,
			anchor:'100%'
		},
		{
			fieldLabel:'状&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;态',
			xtype:'combo',
			emptyText:'请选择',
			store:lc_process_status_combo,
			mode:'local',
			triggerAction:'all',
			editable:false,
			hiddenName:'lc_process_status',
			valueField:'value',
			displayField:'text',
			name:'lc_process_status',
			maxLength:4,
			anchor:'40%'
		},
		{
			fieldLabel:'常&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;量',
			xtype:'combo',
			labelWidth:70,
			emptyText:'请选择',
			store:xt_constant_id_combo,
			mode:'local',
			triggerAction:'all',
			editable:false,
			hiddenName:'xt_constant_id',
			valueField:'xt_constant_id',
			displayField:'xt_constantRemark',
			name:'xt_constant_id',
			anchor:'40%'
		},
		{
			fieldLabel:'标&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;识',
			xtype:'combo',
			emptyText:'请选择',
			store:lc_process_flag_combo,
			mode:'local',
			triggerAction:'all',
			editable:false,
			hiddenName:'lc_process_flag',
			valueField:'value',
			displayField:'text',
			hidden:true,
			value:'1',
			name:'lc_process_flag',
			anchor:'40%'
		},
		{
			fieldLabel:'流程附件',
			xtype:'textfield',
			hidden:true,
			id:'xt_attachment',
			name:'xt_attachment',
			maxLength:32,
			anchor:'100%'
		},
		{
			title:'流程附件',
			xtype:'fieldset',
			items:{
				xtype:'box', 
				id:'xt_attachment_pic', 
				margin:'2 5 4 70', 
				autoEl:{
					tag:'img',
					src:bsdefimg
				}
			}
		},
		{
			fieldLabel:'备&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注',
			xtype:'textareafield',
			name:'lc_process_remark',
			maxLength:800,
			anchor:'100%'
		}
		]
	});
}
